<!--
 * @Description:: 请补充填写
 * @Version: 1.0
 * @Author: 小白
 * @Date: 2022-04-14 14:32:34
 * @LastEditors: 小白
 * @LastEditTime: 2025-11-10 15:35:19
 * @FilePath: \jzadmin\src\views\service_management\service_type\components\search.vue
-->
<template>
  <el-card class="search_card" shadow="never">
    <template #header>
      <div class="card-header">
        <span>条件筛选</span>
      </div>
    </template>
    <el-form :model="form" label-width="100px">
      <el-row>
        <el-col :lg="6" :md="8">
          <el-form-item label="分类名称">
            <el-input v-model="form.name" placeholder="请输入" style="width: 100%" />
          </el-form-item>
        </el-col>
        <el-col :lg="6" :md="8">

          <el-form-item label="开启状态">
            <el-select v-model="form.state" placeholder="请选择" style="width: 100%">
              <el-option label="开启" value="0" />
              <el-option label="禁用" value="1" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :lg="12" :md="8" style="text-align: right">
          <el-button type="primary" @click="searchFun"> 搜索 </el-button>
          <el-button @click="restFun"> 重置 </el-button>
        </el-col>
      </el-row>
    </el-form>
  </el-card>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const emits = defineEmits(['search'])
const dateArr = ref([])
const form = ref({
  name: '',
  state: ''
})
const searchFun = () => {

  emits('search', form.value)
}
const restFun = () => {
  form.value = {
    name: '',
    state: ''
  }
  dateArr.value = []
  emits('search', form.value)
}
</script>

<style lang="scss" scoped>
// @import '@/style/variables.scss';
.card-header {
  display: flex;
  justify-content: space-between;

  .more_text {
    cursor: pointer;
    color: $color;
  }
}
</style>
